package com.lw.question04;

import java.util.Scanner;

/**
 * @author LW
 * @2020/9/15 14:25
 */
public class 判断一组成绩如何2 {
    public static void main(String[] args) {

        int a=0,b=0,c=0,d=0,e=0;
        Scanner scanner = new Scanner(System.in);
        int score;
        do {
            System.out.println("请输入成绩！！！知道输入-1结束");
            score = scanner.nextInt();
            if (score<60){
                a++;
            }else if (60<=score&&score<70){
                b++;
            }else if (70<=score&&score<80){
                c++;
            }else if (80<=score&&score<90){
                d++;
            }else if (90<=score&&score<=100){
                e++;
            }
        }while (score!=-1);
        System.out.println("不及格有"+a+"人");
        System.out.println("及格有"+b+"人");
        System.out.println("中等有"+c+"人");
        System.out.println("良好有"+d+"人");
        System.out.println("优秀有"+e+"人");
    }
}
